{% extends 'base.html' %}

{% block title_suffix %}
 | Question difficulties
{% endblock %}

{% block all_content %}
    <div class="page-header">
        <h1>Difficulties <small>Create or Remove</small></h1>
    </div>
    {% if difficulties %}
        <table class="table table-bordered table-striped table-condensed table-hover">
            <tr>
                <th>Difficulty</th>
                <th style="text-align: center;">Delete</th>
            </tr>
        {% for difficulty in difficulties %}
            <tr>
                <td>{{ difficulty }}</td>
                <td style="text-align: center;"><a href="{% url 'question.views.delete_difficulty' difficulty_id=difficulty.id %}"><i class="icon-remove"></i></a></td>
            </tr>
        {% endfor %}
        </table>
    {% else %}
        <div class="alert alert-info">
            <p>There are no difficulties.</p>
        </div>
    {% endif %}
    <div class="pull-right">
        <a class="btn" href="{% url 'question.views.index' %}">Back to questions</a>
        <a class="btn btn-primary" href="{% url 'question.views.new_difficulty' %}">Create new difficulty</a>
{% endblock %}
